package com.alibaba.system.mapper;

import com.alibaba.basic.mapper.BaseMapper;
import com.alibaba.system.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tom
 * @since 2022-06-11
 */
public interface RoleMapper extends BaseMapper<Role> {
    //Mybatis的多参数操作：Map or 对象  - @Param
    void addRoleMenu(@Param("id") Long id,@Param("menus") List<Long> menus);

    void addRolePermissions(@Param("id") Long id,@Param("permissions") List<Long> permissions);

    void delRoleMenuByRoleID(Long id);

    void delRolePermissionByRoleID(Long id);

    void delEmployeeRoleByRoleID(Long id);
}
